﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;
using log4net;

namespace HpSocketIotGateway
{
    [RunInstaller(true)]
    public partial class InstallerMissingReissue : Installer
    {
        private static readonly ILog Log = LogManager.GetLogger(typeof(InstallerMissingReissue));

        public InstallerMissingReissue()
        {
            try
            {
                InitializeComponent();

                InstallerHelper.InstallServive(this);
            }
            catch (Exception ex)
            {
                Log.Error(ex);
            }

        }

        //注意必须重写Install和Uninstall方法，且在重写方法中必须调用基类对应的方法，否则在安装和卸载服务的过程中会出问题
        //小编就是因为没有调用基类中的方法导致安装和卸载出现问题
        //出此之外还有Commit、Rollback等方法
        public override void Install(IDictionary stateSaver)
        {
            base.Install(stateSaver);
        }

        public override void Uninstall(IDictionary savedState)
        {
            base.Uninstall(savedState);
        }
    }
}
